home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 18 / CU Amiga Magazine's Super CD-ROM 18 (1997)(EMAP Images)(GB)[!][issue 1998-01].iso / CUCD / Programming / AmigaE / Src / OOmodules / library / device / printer / test2.e < prev   
Encoding:
Text File  |  1995-05-16  |  1.1 KB  |  45 lines

  1. /*
  2.  * this tests the printer object. NOTE: those vars are only needed
  3.  * for the graphic dump :)
  4.  */
  5.  
  6. -> NOTE: one modification to reflect enhancement by JEVR3
  7.  
  8. OPT OSVERSION=37
  9.  
  10. MODULE 'oomodules/library/device','exec/io','devices/printer',
  11.        'oomodules/library/device/printer',
  12.        'intuition/intuition', 'intuition/intuitionbase','graphics/gfxbase','graphics/view',
  13.         'graphics/rastport'
  14.  
  15. PROC main()
  16. DEF drucker:PTR TO printer,
  17.     ibase:PTR TO intuitionbase,
  18.     gbase:PTR TO gfxbase,
  19.     vp:PTR TO viewport,
  20.     rp:PTR TO rastport
  21.  
  22.   ibase:=intuitionbase
  23.   gbase:=gfxbase
  24.   rp := ibase.activewindow::window.rport
  25.   vp := gbase.actiview::view.viewport
  26.  
  27. -> JEVR3: added new() to set defaults.
  28.  
  29.   NEW drucker.new()
  30.  
  31.     drucker.graphicdump(        rp,
  32.                                 vp.colormap,
  33.                                 vp.modes,
  34.                                 0,0,100,100,100,100,0)
  35.  
  36.     drucker.rawwrite('Hallo', 5)
  37.     drucker.xcommand(27) -> superscript on
  38.     drucker.write('Hallo', 5)
  39.  
  40.     WriteF('Fehler:\d\n',drucker.io.error)
  41.  
  42.  
  43.   END drucker
  44. ENDPROC
  45.